meta_content="3oUFh0UzjyzKPSbxssm15LA5qRl_8DqpBA1fmk8QDKV1MMuAnpv07p3a7IcrzSNuD62TvmZ3u97a1YlMUJ.naO7XSteNoZAA7SfA7W3gbbbA0DjYEfgHS1QQkYSLE73sE_kWh7oSWiycutfXdvsHJLic_trj1kgA5H1N2KCSNic_GDS5sbjpb4VjsNKpFASMmOZOznd3uIg"
// delete global;
delete __filename;
delete __dirname;
// delete Buffer;
// 自定义日志控制对象
const dconsole = {
    _enabled: true, // 控制开关，改为false或注释此行就能禁用所有dconsole日志

    log(...args) {
        if (this._enabled) {
            console.log(...args);
        }
    },
};

// 修改后的watch函数，使用dconsole替代console.log
function watch(func, name) {
    return new Proxy(func, {
        get(target, p, receiver) {
            if (
                p === "Math" ||
                p === "isNaN" ||
                p === "encodeURI" ||
                p === "Uint8Array" ||
                p === "zzz" ||
                p === "innerHTML"
            ) {
                let val = Reflect.get(...arguments);
                return val;
            } else {
                let val = Reflect.get(...arguments);
                // if(name==='document.all'||p==='all')
                // if(p==='_proto_')
                // debugger

                // 修复：处理 Symbol 类型的属性名
                const propName = typeof p === "symbol" ? p.toString() : p;
                dconsole.log("取值:", `${name}.${propName}`, "=>", val);
                return val;
            }
        },
        set(target, p, value, receiver) {
            let val = Reflect.get(...arguments);
            // 修复：处理 Symbol 类型的属性名
            const propName = typeof p === "symbol" ? p.toString() : p;
            dconsole.log("设置值:", `${name}.${propName}`, val, "=>", value);
            return Reflect.set(...arguments);
        },
    });
}

window = global;
window.top = window;

window.addEventListener = function () {

}
window.setInterval = function () {

}
window.HTMLCanvasElement=function () {

}
window.CanvasRenderingContext2D=function () {

}
window.Navigator=function (par){
    dconsole.log("Navigator:::", par)
}
window.prompt=function (){}
window.webkitRequestFileSystem=function (){}
window.ActiveXObject=undefined;
window.execScript=undefined;
window.msCrypto=undefined;
window.TEMPORARY=0;
window.innerHeight=946
window.innerWidth=92
window.outerHeight=1039
window.outerWidth=974
_head=watch({
    removeChild: function (par) {
        dconsole.log("_head removeChild:::", par)
    }
},"_head:::")

_i=watch([], "_i:::")
_style=watch({

}, "_style:::")
_div = watch({
    getElementsByTagName: function (par) {
        dconsole.log("getElementsByTagName:::", par)
        if (par == "i") {
            return _i
        }
    },
    style: _style,
    setAttribute: function (par) {
        dconsole.log("_div setAttribute:::", par)
    },
}, "_div:::")
_script = watch({
    getAttribute: function (par) {
        dconsole.log("_script getAttribute:::", par)
        if (par==="r"){
            return "m"
        }
    },
    parentElement: _head,
}, "_script:::")
_style = watch({}, "_style:::")
_a = watch({}, "_a:::")
_body = watch({}, "_body:::")
_input = watch({}, "_input:::")


_form = watch({
    action:'https://qikan.cqvip.com/Qikan/Journal/JournalGuid?from=index',
}, "_form:::")
_documentElement = watch({
    getAttribute: function (par) {
        dconsole.log("getAttribute:::", par)
    },
    style:_style,
}, "_documentElement:::")

meta = {
    content: meta_content,
    getAttribute(attr) {
        console.log("meta attr", attr)
        if (attr === "r") {
            return "m"
        }
        // if (attr === "content") {
        //     return
        // }
    },
    parentNode: _head,

}
document = {
    createExpression:function (par){
        dconsole.log("createExpression:::", par)
        if (par=="//html"){
            return watch({},"//html:::")
        }
    },
    visibilityState: "visible",
    createElement: function (par) {
        dconsole.log("createElement:::", par)
        if (par == "div") {
            return _div
        }
        if (par == "a") {
            return _a
        }
        if (par == "form") {
            return _form
        }
        if (par == "input") {
            return _input
        }
    },
    appendChild: function (par) {
        dconsole.log("appendChild:::", par)
    },
    removeChild: function (par) {
        dconsole.log("removeChild:::", par)
    },
    getElementsByTagName: function (par) {
        dconsole.log("document.getElementsByTagName:::", par)
        if (par === "script") {
            return [_script,_script]
        }
        if (par === "meta") {
            return [meta, meta]
        }
        if (par === "base") {
            return []
        }

    },
    getElementById: function (par) {
        dconsole.log("getElementById:::", par)
        if (par === "root-hammerhead-shadow-ui"){
            return watch({},"root-hammerhead-shadow-ui:::")
        }
        if (par === "FbkwzLN5XOx0"){
            return watch({
                getAttribute:function (par){
                    dconsole.log("getElementById getAttribute:::", par)
                    if (par==="r"){
                        return "m"
                    }
                },
                parentNode: _head
            },"FbkwzLN5XOx0:::")
        }
    },
    addEventListener: function (par) {
        dconsole.log("addEventListener:::", par)
    },
    documentElement:_documentElement,
    body:_body,
}
location = {
    "ancestorOrigins": {},
    "href": "https://qikan.cqvip.com/Qikan/Journal/JournalGuid?from=index",
    "origin": "https://qikan.cqvip.com",
    "protocol": "https:",
    "host": "qikan.cqvip.com",
    "hostname": "qikan.cqvip.com",
    "port": "",
    "pathname": "/Qikan/Journal/JournalGuid",
    "search": "?from=index",
    "hash": ""
}
navigator = {
    userAgent:
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0',
    hardwareConcurrency: 16,
    platform: "Win32",
    languages: [
        "zh-CN",
        "en",
        "ar"
    ],
    mimeTypes:watch({},"mimeTypes:::"),
    language: "zh-CN",
    webdriver: false,
    appVersion:
        '5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0',
};


window = watch(window, "window");
document = watch(document, "document");
navigator = watch(navigator, "navigator");

